<?php
/**
 * Template name: Login
 * Login code file
 *
 * TODO: Validação Javascript do formulário
 *
 * @package WordPress
 * @subpackage modulo_padrao
 */
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
	<?php get_header(); ?>
</head>
<body>

	<!-- Wrapper -->
	<div id="page" class="cadastro">
		<?php include(TEMPLATEPATH . "/inc/cabecalho.php"); ?>
		<!-- Content -->
		<div class="content">
			<div id="container">
				<div class="wrapper">
					<!-- Me Apague -->
						<div class="title-explain">
							Módulo Padrão <?php echo MPLIM_VERSION;?> - lostpassword.php
						</div>
						<p>
							Esse arquivo é o lostpassword.php. Esse arquivo é usado para recuperar a senha do usuário do site.<br />
							Esse arquivo só funciona com o permalink customizado ativado.
						</p>
					<!-- //Me Apague -->
					<h1 class="page-title txt-replace pngfix"><span class="ico-title pngfix">Login</span></h1>

						<div class="entry">
							<div class="form-cadastro">
								<?php if($_POST):?>
									<p class="error">
										<?php
											foreach ($errors as $erro){
												foreach ($erro as $error){
													echo $error[0];
													break;
												}
											}
										?>
									</p>
								<?php endif;?>

								<?php if(empty($_GET['checkemail'])) : ?>
									<form class="loginform" name="lostpasswordform" id="lostpasswordform" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" method="post">
										<p>
											<label><?php _e('Username or E-mail:') ?></label>
											<input type="text" name="user_login" id="user_login" class="input" value="<?php echo attribute_escape(stripslashes($_POST['user_login'])); ?>" size="20" tabindex="10" />
										</p>
										<br/>
										<?php do_action('lostpassword_form'); ?>
										<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" value="<?php _e('Get New Password'); ?>" tabindex="100" /></p>
									</form>
								<?php else : ?>
									<p><?php echo $msg; ?></p>
								<?php endif;?>

							</div>
						</div>
				</div>
				<?php get_sidebar();?>
			</div>
		</div>
		<!-- // Content -->
		<?php include(TEMPLATEPATH."/inc/rodape.php")?>
	</div>
	<!-- // Wrapper -->

<?php get_footer(); ?>
</body>
</html>